ESP32 OLED SSD1306 I2C interface – Embedded Diaries 您所在的位置:网站首页 esp32 i2c oled ESP32 OLED SSD1306 I2C interface – Embedded Diaries

ESP32 OLED SSD1306 I2C interface – Embedded Diaries

#ESP32 OLED SSD1306 I2C interface – Embedded Diaries| 来源: 网络整理| 查看: 265

ESP32

A series of low-cost, low-power system on a chip microcontrollers with integrated Wi-Fi and dual-mode Bluetooth. It has Xtensa dual-core (or single-core) 32-bit LX6 microprocessor, operating at 160 or 240 MHz and performing at up to 600 DMIPS Ultra low power (ULP) co-processor and supports wide range of peripheral such as i2c, spi, uart, dac, etc.

SSD1306

SSD1306 is a single-chip CMOS OLED/PLED driver with controller for organic / polymer light emitting diode dot-matrix graphic display system. It consists of 128 segments and 64 commons. This IC is designed for Common Cathode type OLED panel. The SSD1306 embeds with contrast control, display RAM and oscillator, which reduces the number of external components and power consumption. It has 256-step brightness control. It is suitable for many compact portable applications, such as Smart watch,real-time image display of camera on smart car,Battery management device, etc.

Features of OLED display: Monochrome 4-pin SSD1306 0.96” OLED display.128×64 pixel resolution with 160° viewing angle.Supply voltage 3V – 5V (supports both 5V and 3.31v logic devices).Uses SSD1306 for interfacing hence can communicate through SPI or IIC.Screen saving continuous scrolling function in both horizontal and vertical directionRow Re-mapping and Column Re-mapping

In this tutorial, the oled display is interfaced with ESP32Dev kit through I2C protocol. Here ESP-IDF is used for programming ESP32 using C language.

SSD1306 Connections GND ——— GNDVCC ——- 5VSCL ——- GPIO 2SDA ——- GPIO 15

I2C Address of OLED display

If the oled slave address SA0 bit is 0, then microcontroller can do read/write operation with OLED display using below I2C address.

I2C write address is 0x78I2C read address is 0x79

There is two kinds of data need to send to the oled in order to properly initilize and display the characters. Those are commands and pixel data.

//Wrapper to send commands to oled through i2c interface void ssd1306SendCmd(uint8_t command) { esp_err_t espRc; i2c_cmd_handle_t cmd = i2c_cmd_link_create(); i2c_master_start(cmd); i2c_master_write_byte(cmd, (OLED_I2C_ADDRESS


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有